package com.lk.exception;

import com.lk.util.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author : com.com.lk
 * @date 2021/11/21 15:16
 **/
@RestControllerAdvice
public class ExceptionAdvice {

    @ExceptionHandler(value = Exception.class)
    public Result ex(Exception e) {
        return Result.of(500, e.getMessage(), null);
    }
}
